import React from 'react';
export default class CmtItem extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
        }
    }

    // 删除评论
    delHandle(id){
        this.props.del_comments(id);
    }

    render() {
        return <li className="list-group-item  clearfix">
            <div>
                <strong>评论内容</strong>: {this.props.content}
            </div>
            <div className="clearfix">
                <div className="pull-right"><strong>评论人</strong>:{this.props.user}</div>
            </div>
            <div className="clearfix">
                <button onClick={()=>this.delHandle(this.props.id)} type="button" className="btn btn-xs btn-danger pull-right">删除</button>
            </div>
        </li>
    }
}